#pragma once
#ifndef skyTimer_h__
#define skyTimer_h__

#include "./skyAdapter.h"
#include "./skyDelegate.h"
#ifdef _SYMBIAN
#include "../adapter/symbian/symTimer.h"
#elif  defined(_WIN_)
#include "../adapter/windows/winTimer.h"
#else
#include "../adapter/gles/glTimer.h"
#endif

namespace Sky
{
	class Timer : public OSTimer
	{
	public:
		typedef fastdelegate::FastDelegate0<> TimerCallback;
		~Timer(){};
		Bool CreateTimer(i32 MicroSeconds,TimerCallback callback,Bool bRepeat = vTrue);
		Void DeleteTimer();
		static i32 Run( void * aPtr );
		Void onTimer();
	protected:

		TimerCallback _cb;
	};
	
	typedef RefPtr<Timer> TimerPtr;
}
#endif
